
/**
 * This is a generated class and is not intended for modification.  
 */
package com.model.valueObjects
{
import com.adobe.fiber.styles.IStyle;
import com.adobe.fiber.styles.Style;
import com.adobe.fiber.styles.StyleValidator;
import com.adobe.fiber.valueobjects.AbstractEntityMetadata;
import com.adobe.fiber.valueobjects.AvailablePropertyIterator;
import com.adobe.fiber.valueobjects.IPropertyIterator;
import mx.events.ValidationResultEvent;
import com.adobe.fiber.core.model_internal;
import com.adobe.fiber.valueobjects.IModelType;
import mx.events.PropertyChangeEvent;

use namespace model_internal;

[ExcludeClass]
internal class _VoTransactionNoteEntityMetadata extends com.adobe.fiber.valueobjects.AbstractEntityMetadata
{
    private static var emptyArray:Array = new Array();

    model_internal static var allProperties:Array = new Array("note_code", "cre_datetime", "note_description", "cre_userid_fk", "remarks", "pro_serialnumber_fk", "detserialnumber", "serialnumber", "unit_price", "client_serialnumber_fk", "trans_note_header_fk", "trans_serialnumber_fk", "note_type", "price", "discount_or_tax", "trans_qty", "note_date", "activestatus", "quantity", "trans_type", "client_name");
    model_internal static var allAssociationProperties:Array = new Array();
    model_internal static var allRequiredProperties:Array = new Array("note_code", "cre_datetime", "note_description", "cre_userid_fk", "remarks", "pro_serialnumber_fk", "detserialnumber", "serialnumber", "unit_price", "client_serialnumber_fk", "trans_note_header_fk", "trans_serialnumber_fk", "note_type", "price", "discount_or_tax", "trans_qty", "note_date", "activestatus", "quantity", "trans_type", "client_name");
    model_internal static var allAlwaysAvailableProperties:Array = new Array("note_code", "cre_datetime", "note_description", "cre_userid_fk", "remarks", "pro_serialnumber_fk", "detserialnumber", "serialnumber", "unit_price", "client_serialnumber_fk", "trans_note_header_fk", "trans_serialnumber_fk", "note_type", "price", "discount_or_tax", "trans_qty", "note_date", "activestatus", "quantity", "trans_type", "client_name");
    model_internal static var guardedProperties:Array = new Array();
    model_internal static var dataProperties:Array = new Array("note_code", "cre_datetime", "note_description", "cre_userid_fk", "remarks", "pro_serialnumber_fk", "detserialnumber", "serialnumber", "unit_price", "client_serialnumber_fk", "trans_note_header_fk", "trans_serialnumber_fk", "note_type", "price", "discount_or_tax", "trans_qty", "note_date", "activestatus", "quantity", "trans_type", "client_name");
    model_internal static var derivedProperties:Array = new Array();
    model_internal static var collectionProperties:Array = new Array("remarks", "pro_serialnumber_fk", "detserialnumber", "unit_price", "trans_note_header_fk", "trans_serialnumber_fk", "price", "discount_or_tax", "trans_qty", "quantity");
    model_internal static var collectionBaseMap:Object;
    model_internal static var entityName:String = "VoTransactionNote";
    model_internal static var dependentsOnMap:Object;
    model_internal static var dependedOnServices:Array = new Array();

    
    model_internal var _note_codeIsValid:Boolean;
    model_internal var _note_codeValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _note_codeIsValidCacheInitialized:Boolean = false;
    model_internal var _note_codeValidationFailureMessages:Array;
    
    model_internal var _cre_datetimeIsValid:Boolean;
    model_internal var _cre_datetimeValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _cre_datetimeIsValidCacheInitialized:Boolean = false;
    model_internal var _cre_datetimeValidationFailureMessages:Array;
    
    model_internal var _note_descriptionIsValid:Boolean;
    model_internal var _note_descriptionValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _note_descriptionIsValidCacheInitialized:Boolean = false;
    model_internal var _note_descriptionValidationFailureMessages:Array;
    
    model_internal var _remarksIsValid:Boolean;
    model_internal var _remarksValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _remarksIsValidCacheInitialized:Boolean = false;
    model_internal var _remarksValidationFailureMessages:Array;
    
    model_internal var _pro_serialnumber_fkIsValid:Boolean;
    model_internal var _pro_serialnumber_fkValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _pro_serialnumber_fkIsValidCacheInitialized:Boolean = false;
    model_internal var _pro_serialnumber_fkValidationFailureMessages:Array;
    
    model_internal var _detserialnumberIsValid:Boolean;
    model_internal var _detserialnumberValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _detserialnumberIsValidCacheInitialized:Boolean = false;
    model_internal var _detserialnumberValidationFailureMessages:Array;
    
    model_internal var _unit_priceIsValid:Boolean;
    model_internal var _unit_priceValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _unit_priceIsValidCacheInitialized:Boolean = false;
    model_internal var _unit_priceValidationFailureMessages:Array;
    
    model_internal var _trans_note_header_fkIsValid:Boolean;
    model_internal var _trans_note_header_fkValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _trans_note_header_fkIsValidCacheInitialized:Boolean = false;
    model_internal var _trans_note_header_fkValidationFailureMessages:Array;
    
    model_internal var _trans_serialnumber_fkIsValid:Boolean;
    model_internal var _trans_serialnumber_fkValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _trans_serialnumber_fkIsValidCacheInitialized:Boolean = false;
    model_internal var _trans_serialnumber_fkValidationFailureMessages:Array;
    
    model_internal var _note_typeIsValid:Boolean;
    model_internal var _note_typeValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _note_typeIsValidCacheInitialized:Boolean = false;
    model_internal var _note_typeValidationFailureMessages:Array;
    
    model_internal var _priceIsValid:Boolean;
    model_internal var _priceValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _priceIsValidCacheInitialized:Boolean = false;
    model_internal var _priceValidationFailureMessages:Array;
    
    model_internal var _discount_or_taxIsValid:Boolean;
    model_internal var _discount_or_taxValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _discount_or_taxIsValidCacheInitialized:Boolean = false;
    model_internal var _discount_or_taxValidationFailureMessages:Array;
    
    model_internal var _trans_qtyIsValid:Boolean;
    model_internal var _trans_qtyValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _trans_qtyIsValidCacheInitialized:Boolean = false;
    model_internal var _trans_qtyValidationFailureMessages:Array;
    
    model_internal var _note_dateIsValid:Boolean;
    model_internal var _note_dateValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _note_dateIsValidCacheInitialized:Boolean = false;
    model_internal var _note_dateValidationFailureMessages:Array;
    
    model_internal var _quantityIsValid:Boolean;
    model_internal var _quantityValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _quantityIsValidCacheInitialized:Boolean = false;
    model_internal var _quantityValidationFailureMessages:Array;
    
    model_internal var _trans_typeIsValid:Boolean;
    model_internal var _trans_typeValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _trans_typeIsValidCacheInitialized:Boolean = false;
    model_internal var _trans_typeValidationFailureMessages:Array;
    
    model_internal var _client_nameIsValid:Boolean;
    model_internal var _client_nameValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _client_nameIsValidCacheInitialized:Boolean = false;
    model_internal var _client_nameValidationFailureMessages:Array;

    model_internal var _instance:_Super_VoTransactionNote;
    model_internal static var _nullStyle:com.adobe.fiber.styles.Style = new com.adobe.fiber.styles.Style();

    public function _VoTransactionNoteEntityMetadata(value : _Super_VoTransactionNote)
    {
        // initialize property maps
        if (model_internal::dependentsOnMap == null)
        {
            // depenents map
            model_internal::dependentsOnMap = new Object();
            model_internal::dependentsOnMap["note_code"] = new Array();
            model_internal::dependentsOnMap["cre_datetime"] = new Array();
            model_internal::dependentsOnMap["note_description"] = new Array();
            model_internal::dependentsOnMap["cre_userid_fk"] = new Array();
            model_internal::dependentsOnMap["remarks"] = new Array();
            model_internal::dependentsOnMap["pro_serialnumber_fk"] = new Array();
            model_internal::dependentsOnMap["detserialnumber"] = new Array();
            model_internal::dependentsOnMap["serialnumber"] = new Array();
            model_internal::dependentsOnMap["unit_price"] = new Array();
            model_internal::dependentsOnMap["client_serialnumber_fk"] = new Array();
            model_internal::dependentsOnMap["trans_note_header_fk"] = new Array();
            model_internal::dependentsOnMap["trans_serialnumber_fk"] = new Array();
            model_internal::dependentsOnMap["note_type"] = new Array();
            model_internal::dependentsOnMap["price"] = new Array();
            model_internal::dependentsOnMap["discount_or_tax"] = new Array();
            model_internal::dependentsOnMap["trans_qty"] = new Array();
            model_internal::dependentsOnMap["note_date"] = new Array();
            model_internal::dependentsOnMap["activestatus"] = new Array();
            model_internal::dependentsOnMap["quantity"] = new Array();
            model_internal::dependentsOnMap["trans_type"] = new Array();
            model_internal::dependentsOnMap["client_name"] = new Array();

            // collection base map
            model_internal::collectionBaseMap = new Object()
            model_internal::collectionBaseMap["remarks"] = "String";
            model_internal::collectionBaseMap["pro_serialnumber_fk"] = "int";
            model_internal::collectionBaseMap["detserialnumber"] = "int";
            model_internal::collectionBaseMap["unit_price"] = "String";
            model_internal::collectionBaseMap["trans_note_header_fk"] = "int";
            model_internal::collectionBaseMap["trans_serialnumber_fk"] = "int";
            model_internal::collectionBaseMap["price"] = "int";
            model_internal::collectionBaseMap["discount_or_tax"] = "String";
            model_internal::collectionBaseMap["trans_qty"] = "int";
            model_internal::collectionBaseMap["quantity"] = "int";
        }

        model_internal::_instance = value;
        model_internal::_note_codeValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForNote_code);
        model_internal::_note_codeValidator.required = true;
        model_internal::_note_codeValidator.requiredFieldError = "note_code is required";
        //model_internal::_note_codeValidator.source = model_internal::_instance;
        //model_internal::_note_codeValidator.property = "note_code";
        model_internal::_cre_datetimeValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForCre_datetime);
        model_internal::_cre_datetimeValidator.required = true;
        model_internal::_cre_datetimeValidator.requiredFieldError = "cre_datetime is required";
        //model_internal::_cre_datetimeValidator.source = model_internal::_instance;
        //model_internal::_cre_datetimeValidator.property = "cre_datetime";
        model_internal::_note_descriptionValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForNote_description);
        model_internal::_note_descriptionValidator.required = true;
        model_internal::_note_descriptionValidator.requiredFieldError = "note_description is required";
        //model_internal::_note_descriptionValidator.source = model_internal::_instance;
        //model_internal::_note_descriptionValidator.property = "note_description";
        model_internal::_remarksValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForRemarks);
        model_internal::_remarksValidator.required = true;
        model_internal::_remarksValidator.requiredFieldError = "remarks is required";
        //model_internal::_remarksValidator.source = model_internal::_instance;
        //model_internal::_remarksValidator.property = "remarks";
        model_internal::_pro_serialnumber_fkValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForPro_serialnumber_fk);
        model_internal::_pro_serialnumber_fkValidator.required = true;
        model_internal::_pro_serialnumber_fkValidator.requiredFieldError = "pro_serialnumber_fk is required";
        //model_internal::_pro_serialnumber_fkValidator.source = model_internal::_instance;
        //model_internal::_pro_serialnumber_fkValidator.property = "pro_serialnumber_fk";
        model_internal::_detserialnumberValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForDetserialnumber);
        model_internal::_detserialnumberValidator.required = true;
        model_internal::_detserialnumberValidator.requiredFieldError = "detserialnumber is required";
        //model_internal::_detserialnumberValidator.source = model_internal::_instance;
        //model_internal::_detserialnumberValidator.property = "detserialnumber";
        model_internal::_unit_priceValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForUnit_price);
        model_internal::_unit_priceValidator.required = true;
        model_internal::_unit_priceValidator.requiredFieldError = "unit_price is required";
        //model_internal::_unit_priceValidator.source = model_internal::_instance;
        //model_internal::_unit_priceValidator.property = "unit_price";
        model_internal::_trans_note_header_fkValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForTrans_note_header_fk);
        model_internal::_trans_note_header_fkValidator.required = true;
        model_internal::_trans_note_header_fkValidator.requiredFieldError = "trans_note_header_fk is required";
        //model_internal::_trans_note_header_fkValidator.source = model_internal::_instance;
        //model_internal::_trans_note_header_fkValidator.property = "trans_note_header_fk";
        model_internal::_trans_serialnumber_fkValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForTrans_serialnumber_fk);
        model_internal::_trans_serialnumber_fkValidator.required = true;
        model_internal::_trans_serialnumber_fkValidator.requiredFieldError = "trans_serialnumber_fk is required";
        //model_internal::_trans_serialnumber_fkValidator.source = model_internal::_instance;
        //model_internal::_trans_serialnumber_fkValidator.property = "trans_serialnumber_fk";
        model_internal::_note_typeValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForNote_type);
        model_internal::_note_typeValidator.required = true;
        model_internal::_note_typeValidator.requiredFieldError = "note_type is required";
        //model_internal::_note_typeValidator.source = model_internal::_instance;
        //model_internal::_note_typeValidator.property = "note_type";
        model_internal::_priceValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForPrice);
        model_internal::_priceValidator.required = true;
        model_internal::_priceValidator.requiredFieldError = "price is required";
        //model_internal::_priceValidator.source = model_internal::_instance;
        //model_internal::_priceValidator.property = "price";
        model_internal::_discount_or_taxValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForDiscount_or_tax);
        model_internal::_discount_or_taxValidator.required = true;
        model_internal::_discount_or_taxValidator.requiredFieldError = "discount_or_tax is required";
        //model_internal::_discount_or_taxValidator.source = model_internal::_instance;
        //model_internal::_discount_or_taxValidator.property = "discount_or_tax";
        model_internal::_trans_qtyValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForTrans_qty);
        model_internal::_trans_qtyValidator.required = true;
        model_internal::_trans_qtyValidator.requiredFieldError = "trans_qty is required";
        //model_internal::_trans_qtyValidator.source = model_internal::_instance;
        //model_internal::_trans_qtyValidator.property = "trans_qty";
        model_internal::_note_dateValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForNote_date);
        model_internal::_note_dateValidator.required = true;
        model_internal::_note_dateValidator.requiredFieldError = "note_date is required";
        //model_internal::_note_dateValidator.source = model_internal::_instance;
        //model_internal::_note_dateValidator.property = "note_date";
        model_internal::_quantityValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForQuantity);
        model_internal::_quantityValidator.required = true;
        model_internal::_quantityValidator.requiredFieldError = "quantity is required";
        //model_internal::_quantityValidator.source = model_internal::_instance;
        //model_internal::_quantityValidator.property = "quantity";
        model_internal::_trans_typeValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForTrans_type);
        model_internal::_trans_typeValidator.required = true;
        model_internal::_trans_typeValidator.requiredFieldError = "trans_type is required";
        //model_internal::_trans_typeValidator.source = model_internal::_instance;
        //model_internal::_trans_typeValidator.property = "trans_type";
        model_internal::_client_nameValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForClient_name);
        model_internal::_client_nameValidator.required = true;
        model_internal::_client_nameValidator.requiredFieldError = "client_name is required";
        //model_internal::_client_nameValidator.source = model_internal::_instance;
        //model_internal::_client_nameValidator.property = "client_name";
    }

    override public function getEntityName():String
    {
        return model_internal::entityName;
    }

    override public function getProperties():Array
    {
        return model_internal::allProperties;
    }

    override public function getAssociationProperties():Array
    {
        return model_internal::allAssociationProperties;
    }

    override public function getRequiredProperties():Array
    {
         return model_internal::allRequiredProperties;   
    }

    override public function getDataProperties():Array
    {
        return model_internal::dataProperties;
    }

    override public function getGuardedProperties():Array
    {
        return model_internal::guardedProperties;
    }

    override public function getUnguardedProperties():Array
    {
        return model_internal::allAlwaysAvailableProperties;
    }

    override public function getDependants(propertyName:String):Array
    {
       if (model_internal::dataProperties.indexOf(propertyName) == -1)
            throw new Error(propertyName + " is not a data property of entity VoTransactionNote");  
            
       return model_internal::dependentsOnMap[propertyName] as Array;  
    }

    override public function getDependedOnServices():Array
    {
        return model_internal::dependedOnServices;
    }

    override public function getCollectionProperties():Array
    {
        return model_internal::collectionProperties;
    }

    override public function getCollectionBase(propertyName:String):String
    {
        if (model_internal::collectionProperties.indexOf(propertyName) == -1)
            throw new Error(propertyName + " is not a collection property of entity VoTransactionNote");  

        return model_internal::collectionBaseMap[propertyName];
    }

    override public function getAvailableProperties():com.adobe.fiber.valueobjects.IPropertyIterator
    {
        return new com.adobe.fiber.valueobjects.AvailablePropertyIterator(this);
    }

    override public function getValue(propertyName:String):*
    {
        if (model_internal::allProperties.indexOf(propertyName) == -1)
        {
            throw new Error(propertyName + " does not exist for entity VoTransactionNote");
        }

        return model_internal::_instance[propertyName];
    }

    override public function setValue(propertyName:String, value:*):void
    {
        if (model_internal::dataProperties.indexOf(propertyName) == -1)
        {
            throw new Error(propertyName + " is not a data property of entity VoTransactionNote");
        }

        model_internal::_instance[propertyName] = value;
    }

    override public function getMappedByProperty(associationProperty:String):String
    {
        switch(associationProperty)
        {
            default:
            {
                return null;
            }
        }
    }

    override public function getPropertyLength(propertyName:String):int
    {
        switch(propertyName)
        {
            default:
            {
                return 0;
            }
        }
    }

    override public function isAvailable(propertyName:String):Boolean
    {
        if (model_internal::allProperties.indexOf(propertyName) == -1)
        {
            throw new Error(propertyName + " does not exist for entity VoTransactionNote");
        }

        if (model_internal::allAlwaysAvailableProperties.indexOf(propertyName) != -1)
        {
            return true;
        }

        switch(propertyName)
        {
            default:
            {
                return true;
            }
        }
    }

    override public function getIdentityMap():Object
    {
        var returnMap:Object = new Object();

        return returnMap;
    }

    [Bindable(event="propertyChange")]
    override public function get invalidConstraints():Array
    {
        if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
        {
            return model_internal::_instance.model_internal::_invalidConstraints;
        }
        else
        {
            // recalculate isValid
            model_internal::_instance.model_internal::_isValid = model_internal::_instance.model_internal::calculateIsValid();
            return model_internal::_instance.model_internal::_invalidConstraints;        
        }
    }

    [Bindable(event="propertyChange")]
    override public function get validationFailureMessages():Array
    {
        if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
        {
            return model_internal::_instance.model_internal::_validationFailureMessages;
        }
        else
        {
            // recalculate isValid
            model_internal::_instance.model_internal::_isValid = model_internal::_instance.model_internal::calculateIsValid();
            return model_internal::_instance.model_internal::_validationFailureMessages;
        }
    }

    override public function getDependantInvalidConstraints(propertyName:String):Array
    {
        var dependants:Array = getDependants(propertyName);
        if (dependants.length == 0)
        {
            return emptyArray;
        }

        var currentlyInvalid:Array = invalidConstraints;
        if (currentlyInvalid.length == 0)
        {
            return emptyArray;
        }

        var filterFunc:Function = function(element:*, index:int, arr:Array):Boolean
        {
            return dependants.indexOf(element) > -1;
        }

        return currentlyInvalid.filter(filterFunc);
    }

    /**
     * isValid
     */
    [Bindable(event="propertyChange")] 
    public function get isValid() : Boolean
    {
        if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
        {
            return model_internal::_instance.model_internal::_isValid;
        }
        else
        {
            // recalculate isValid
            model_internal::_instance.model_internal::_isValid = model_internal::_instance.model_internal::calculateIsValid();
            return model_internal::_instance.model_internal::_isValid;
        }
    }

    [Bindable(event="propertyChange")]
    public function get isNote_codeAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isCre_datetimeAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isNote_descriptionAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isCre_userid_fkAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isRemarksAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isPro_serialnumber_fkAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isDetserialnumberAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isSerialnumberAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isUnit_priceAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isClient_serialnumber_fkAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isTrans_note_header_fkAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isTrans_serialnumber_fkAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isNote_typeAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isPriceAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isDiscount_or_taxAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isTrans_qtyAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isNote_dateAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isActivestatusAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isQuantityAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isTrans_typeAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isClient_nameAvailable():Boolean
    {
        return true;
    }


    /**
     * derived property recalculation
     */
    public function invalidateDependentOnNote_code():void
    {
        if (model_internal::_note_codeIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfNote_code = null;
            model_internal::calculateNote_codeIsValid();
        }
    }
    public function invalidateDependentOnCre_datetime():void
    {
        if (model_internal::_cre_datetimeIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfCre_datetime = null;
            model_internal::calculateCre_datetimeIsValid();
        }
    }
    public function invalidateDependentOnNote_description():void
    {
        if (model_internal::_note_descriptionIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfNote_description = null;
            model_internal::calculateNote_descriptionIsValid();
        }
    }
    public function invalidateDependentOnRemarks():void
    {
        if (model_internal::_remarksIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfRemarks = null;
            model_internal::calculateRemarksIsValid();
        }
    }
    public function invalidateDependentOnPro_serialnumber_fk():void
    {
        if (model_internal::_pro_serialnumber_fkIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfPro_serialnumber_fk = null;
            model_internal::calculatePro_serialnumber_fkIsValid();
        }
    }
    public function invalidateDependentOnDetserialnumber():void
    {
        if (model_internal::_detserialnumberIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfDetserialnumber = null;
            model_internal::calculateDetserialnumberIsValid();
        }
    }
    public function invalidateDependentOnUnit_price():void
    {
        if (model_internal::_unit_priceIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfUnit_price = null;
            model_internal::calculateUnit_priceIsValid();
        }
    }
    public function invalidateDependentOnTrans_note_header_fk():void
    {
        if (model_internal::_trans_note_header_fkIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfTrans_note_header_fk = null;
            model_internal::calculateTrans_note_header_fkIsValid();
        }
    }
    public function invalidateDependentOnTrans_serialnumber_fk():void
    {
        if (model_internal::_trans_serialnumber_fkIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfTrans_serialnumber_fk = null;
            model_internal::calculateTrans_serialnumber_fkIsValid();
        }
    }
    public function invalidateDependentOnNote_type():void
    {
        if (model_internal::_note_typeIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfNote_type = null;
            model_internal::calculateNote_typeIsValid();
        }
    }
    public function invalidateDependentOnPrice():void
    {
        if (model_internal::_priceIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfPrice = null;
            model_internal::calculatePriceIsValid();
        }
    }
    public function invalidateDependentOnDiscount_or_tax():void
    {
        if (model_internal::_discount_or_taxIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfDiscount_or_tax = null;
            model_internal::calculateDiscount_or_taxIsValid();
        }
    }
    public function invalidateDependentOnTrans_qty():void
    {
        if (model_internal::_trans_qtyIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfTrans_qty = null;
            model_internal::calculateTrans_qtyIsValid();
        }
    }
    public function invalidateDependentOnNote_date():void
    {
        if (model_internal::_note_dateIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfNote_date = null;
            model_internal::calculateNote_dateIsValid();
        }
    }
    public function invalidateDependentOnQuantity():void
    {
        if (model_internal::_quantityIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfQuantity = null;
            model_internal::calculateQuantityIsValid();
        }
    }
    public function invalidateDependentOnTrans_type():void
    {
        if (model_internal::_trans_typeIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfTrans_type = null;
            model_internal::calculateTrans_typeIsValid();
        }
    }
    public function invalidateDependentOnClient_name():void
    {
        if (model_internal::_client_nameIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfClient_name = null;
            model_internal::calculateClient_nameIsValid();
        }
    }

    model_internal function fireChangeEvent(propertyName:String, oldValue:Object, newValue:Object):void
    {
        this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, propertyName, oldValue, newValue));
    }

    [Bindable(event="propertyChange")]   
    public function get note_codeStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get note_codeValidator() : StyleValidator
    {
        return model_internal::_note_codeValidator;
    }

    model_internal function set _note_codeIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_note_codeIsValid;         
        if (oldValue !== value)
        {
            model_internal::_note_codeIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "note_codeIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get note_codeIsValid():Boolean
    {
        if (!model_internal::_note_codeIsValidCacheInitialized)
        {
            model_internal::calculateNote_codeIsValid();
        }

        return model_internal::_note_codeIsValid;
    }

    model_internal function calculateNote_codeIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_note_codeValidator.validate(model_internal::_instance.note_code)
        model_internal::_note_codeIsValid_der = (valRes.results == null);
        model_internal::_note_codeIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::note_codeValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::note_codeValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get note_codeValidationFailureMessages():Array
    {
        if (model_internal::_note_codeValidationFailureMessages == null)
            model_internal::calculateNote_codeIsValid();

        return _note_codeValidationFailureMessages;
    }

    model_internal function set note_codeValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_note_codeValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_note_codeValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "note_codeValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get cre_datetimeStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get cre_datetimeValidator() : StyleValidator
    {
        return model_internal::_cre_datetimeValidator;
    }

    model_internal function set _cre_datetimeIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_cre_datetimeIsValid;         
        if (oldValue !== value)
        {
            model_internal::_cre_datetimeIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "cre_datetimeIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get cre_datetimeIsValid():Boolean
    {
        if (!model_internal::_cre_datetimeIsValidCacheInitialized)
        {
            model_internal::calculateCre_datetimeIsValid();
        }

        return model_internal::_cre_datetimeIsValid;
    }

    model_internal function calculateCre_datetimeIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_cre_datetimeValidator.validate(model_internal::_instance.cre_datetime)
        model_internal::_cre_datetimeIsValid_der = (valRes.results == null);
        model_internal::_cre_datetimeIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::cre_datetimeValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::cre_datetimeValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get cre_datetimeValidationFailureMessages():Array
    {
        if (model_internal::_cre_datetimeValidationFailureMessages == null)
            model_internal::calculateCre_datetimeIsValid();

        return _cre_datetimeValidationFailureMessages;
    }

    model_internal function set cre_datetimeValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_cre_datetimeValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_cre_datetimeValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "cre_datetimeValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get note_descriptionStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get note_descriptionValidator() : StyleValidator
    {
        return model_internal::_note_descriptionValidator;
    }

    model_internal function set _note_descriptionIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_note_descriptionIsValid;         
        if (oldValue !== value)
        {
            model_internal::_note_descriptionIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "note_descriptionIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get note_descriptionIsValid():Boolean
    {
        if (!model_internal::_note_descriptionIsValidCacheInitialized)
        {
            model_internal::calculateNote_descriptionIsValid();
        }

        return model_internal::_note_descriptionIsValid;
    }

    model_internal function calculateNote_descriptionIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_note_descriptionValidator.validate(model_internal::_instance.note_description)
        model_internal::_note_descriptionIsValid_der = (valRes.results == null);
        model_internal::_note_descriptionIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::note_descriptionValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::note_descriptionValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get note_descriptionValidationFailureMessages():Array
    {
        if (model_internal::_note_descriptionValidationFailureMessages == null)
            model_internal::calculateNote_descriptionIsValid();

        return _note_descriptionValidationFailureMessages;
    }

    model_internal function set note_descriptionValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_note_descriptionValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_note_descriptionValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "note_descriptionValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get cre_userid_fkStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    [Bindable(event="propertyChange")]   
    public function get remarksStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get remarksValidator() : StyleValidator
    {
        return model_internal::_remarksValidator;
    }

    model_internal function set _remarksIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_remarksIsValid;         
        if (oldValue !== value)
        {
            model_internal::_remarksIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "remarksIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get remarksIsValid():Boolean
    {
        if (!model_internal::_remarksIsValidCacheInitialized)
        {
            model_internal::calculateRemarksIsValid();
        }

        return model_internal::_remarksIsValid;
    }

    model_internal function calculateRemarksIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_remarksValidator.validate(model_internal::_instance.remarks)
        model_internal::_remarksIsValid_der = (valRes.results == null);
        model_internal::_remarksIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::remarksValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::remarksValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get remarksValidationFailureMessages():Array
    {
        if (model_internal::_remarksValidationFailureMessages == null)
            model_internal::calculateRemarksIsValid();

        return _remarksValidationFailureMessages;
    }

    model_internal function set remarksValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_remarksValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_remarksValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "remarksValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get pro_serialnumber_fkStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get pro_serialnumber_fkValidator() : StyleValidator
    {
        return model_internal::_pro_serialnumber_fkValidator;
    }

    model_internal function set _pro_serialnumber_fkIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_pro_serialnumber_fkIsValid;         
        if (oldValue !== value)
        {
            model_internal::_pro_serialnumber_fkIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "pro_serialnumber_fkIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get pro_serialnumber_fkIsValid():Boolean
    {
        if (!model_internal::_pro_serialnumber_fkIsValidCacheInitialized)
        {
            model_internal::calculatePro_serialnumber_fkIsValid();
        }

        return model_internal::_pro_serialnumber_fkIsValid;
    }

    model_internal function calculatePro_serialnumber_fkIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_pro_serialnumber_fkValidator.validate(model_internal::_instance.pro_serialnumber_fk)
        model_internal::_pro_serialnumber_fkIsValid_der = (valRes.results == null);
        model_internal::_pro_serialnumber_fkIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::pro_serialnumber_fkValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::pro_serialnumber_fkValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get pro_serialnumber_fkValidationFailureMessages():Array
    {
        if (model_internal::_pro_serialnumber_fkValidationFailureMessages == null)
            model_internal::calculatePro_serialnumber_fkIsValid();

        return _pro_serialnumber_fkValidationFailureMessages;
    }

    model_internal function set pro_serialnumber_fkValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_pro_serialnumber_fkValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_pro_serialnumber_fkValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "pro_serialnumber_fkValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get detserialnumberStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get detserialnumberValidator() : StyleValidator
    {
        return model_internal::_detserialnumberValidator;
    }

    model_internal function set _detserialnumberIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_detserialnumberIsValid;         
        if (oldValue !== value)
        {
            model_internal::_detserialnumberIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "detserialnumberIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get detserialnumberIsValid():Boolean
    {
        if (!model_internal::_detserialnumberIsValidCacheInitialized)
        {
            model_internal::calculateDetserialnumberIsValid();
        }

        return model_internal::_detserialnumberIsValid;
    }

    model_internal function calculateDetserialnumberIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_detserialnumberValidator.validate(model_internal::_instance.detserialnumber)
        model_internal::_detserialnumberIsValid_der = (valRes.results == null);
        model_internal::_detserialnumberIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::detserialnumberValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::detserialnumberValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get detserialnumberValidationFailureMessages():Array
    {
        if (model_internal::_detserialnumberValidationFailureMessages == null)
            model_internal::calculateDetserialnumberIsValid();

        return _detserialnumberValidationFailureMessages;
    }

    model_internal function set detserialnumberValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_detserialnumberValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_detserialnumberValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "detserialnumberValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get serialnumberStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    [Bindable(event="propertyChange")]   
    public function get unit_priceStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get unit_priceValidator() : StyleValidator
    {
        return model_internal::_unit_priceValidator;
    }

    model_internal function set _unit_priceIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_unit_priceIsValid;         
        if (oldValue !== value)
        {
            model_internal::_unit_priceIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "unit_priceIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get unit_priceIsValid():Boolean
    {
        if (!model_internal::_unit_priceIsValidCacheInitialized)
        {
            model_internal::calculateUnit_priceIsValid();
        }

        return model_internal::_unit_priceIsValid;
    }

    model_internal function calculateUnit_priceIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_unit_priceValidator.validate(model_internal::_instance.unit_price)
        model_internal::_unit_priceIsValid_der = (valRes.results == null);
        model_internal::_unit_priceIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::unit_priceValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::unit_priceValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get unit_priceValidationFailureMessages():Array
    {
        if (model_internal::_unit_priceValidationFailureMessages == null)
            model_internal::calculateUnit_priceIsValid();

        return _unit_priceValidationFailureMessages;
    }

    model_internal function set unit_priceValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_unit_priceValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_unit_priceValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "unit_priceValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get client_serialnumber_fkStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    [Bindable(event="propertyChange")]   
    public function get trans_note_header_fkStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get trans_note_header_fkValidator() : StyleValidator
    {
        return model_internal::_trans_note_header_fkValidator;
    }

    model_internal function set _trans_note_header_fkIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_trans_note_header_fkIsValid;         
        if (oldValue !== value)
        {
            model_internal::_trans_note_header_fkIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "trans_note_header_fkIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get trans_note_header_fkIsValid():Boolean
    {
        if (!model_internal::_trans_note_header_fkIsValidCacheInitialized)
        {
            model_internal::calculateTrans_note_header_fkIsValid();
        }

        return model_internal::_trans_note_header_fkIsValid;
    }

    model_internal function calculateTrans_note_header_fkIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_trans_note_header_fkValidator.validate(model_internal::_instance.trans_note_header_fk)
        model_internal::_trans_note_header_fkIsValid_der = (valRes.results == null);
        model_internal::_trans_note_header_fkIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::trans_note_header_fkValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::trans_note_header_fkValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get trans_note_header_fkValidationFailureMessages():Array
    {
        if (model_internal::_trans_note_header_fkValidationFailureMessages == null)
            model_internal::calculateTrans_note_header_fkIsValid();

        return _trans_note_header_fkValidationFailureMessages;
    }

    model_internal function set trans_note_header_fkValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_trans_note_header_fkValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_trans_note_header_fkValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "trans_note_header_fkValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get trans_serialnumber_fkStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get trans_serialnumber_fkValidator() : StyleValidator
    {
        return model_internal::_trans_serialnumber_fkValidator;
    }

    model_internal function set _trans_serialnumber_fkIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_trans_serialnumber_fkIsValid;         
        if (oldValue !== value)
        {
            model_internal::_trans_serialnumber_fkIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "trans_serialnumber_fkIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get trans_serialnumber_fkIsValid():Boolean
    {
        if (!model_internal::_trans_serialnumber_fkIsValidCacheInitialized)
        {
            model_internal::calculateTrans_serialnumber_fkIsValid();
        }

        return model_internal::_trans_serialnumber_fkIsValid;
    }

    model_internal function calculateTrans_serialnumber_fkIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_trans_serialnumber_fkValidator.validate(model_internal::_instance.trans_serialnumber_fk)
        model_internal::_trans_serialnumber_fkIsValid_der = (valRes.results == null);
        model_internal::_trans_serialnumber_fkIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::trans_serialnumber_fkValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::trans_serialnumber_fkValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get trans_serialnumber_fkValidationFailureMessages():Array
    {
        if (model_internal::_trans_serialnumber_fkValidationFailureMessages == null)
            model_internal::calculateTrans_serialnumber_fkIsValid();

        return _trans_serialnumber_fkValidationFailureMessages;
    }

    model_internal function set trans_serialnumber_fkValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_trans_serialnumber_fkValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_trans_serialnumber_fkValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "trans_serialnumber_fkValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get note_typeStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get note_typeValidator() : StyleValidator
    {
        return model_internal::_note_typeValidator;
    }

    model_internal function set _note_typeIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_note_typeIsValid;         
        if (oldValue !== value)
        {
            model_internal::_note_typeIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "note_typeIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get note_typeIsValid():Boolean
    {
        if (!model_internal::_note_typeIsValidCacheInitialized)
        {
            model_internal::calculateNote_typeIsValid();
        }

        return model_internal::_note_typeIsValid;
    }

    model_internal function calculateNote_typeIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_note_typeValidator.validate(model_internal::_instance.note_type)
        model_internal::_note_typeIsValid_der = (valRes.results == null);
        model_internal::_note_typeIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::note_typeValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::note_typeValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get note_typeValidationFailureMessages():Array
    {
        if (model_internal::_note_typeValidationFailureMessages == null)
            model_internal::calculateNote_typeIsValid();

        return _note_typeValidationFailureMessages;
    }

    model_internal function set note_typeValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_note_typeValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_note_typeValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "note_typeValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get priceStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get priceValidator() : StyleValidator
    {
        return model_internal::_priceValidator;
    }

    model_internal function set _priceIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_priceIsValid;         
        if (oldValue !== value)
        {
            model_internal::_priceIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "priceIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get priceIsValid():Boolean
    {
        if (!model_internal::_priceIsValidCacheInitialized)
        {
            model_internal::calculatePriceIsValid();
        }

        return model_internal::_priceIsValid;
    }

    model_internal function calculatePriceIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_priceValidator.validate(model_internal::_instance.price)
        model_internal::_priceIsValid_der = (valRes.results == null);
        model_internal::_priceIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::priceValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::priceValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get priceValidationFailureMessages():Array
    {
        if (model_internal::_priceValidationFailureMessages == null)
            model_internal::calculatePriceIsValid();

        return _priceValidationFailureMessages;
    }

    model_internal function set priceValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_priceValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_priceValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "priceValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get discount_or_taxStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get discount_or_taxValidator() : StyleValidator
    {
        return model_internal::_discount_or_taxValidator;
    }

    model_internal function set _discount_or_taxIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_discount_or_taxIsValid;         
        if (oldValue !== value)
        {
            model_internal::_discount_or_taxIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "discount_or_taxIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get discount_or_taxIsValid():Boolean
    {
        if (!model_internal::_discount_or_taxIsValidCacheInitialized)
        {
            model_internal::calculateDiscount_or_taxIsValid();
        }

        return model_internal::_discount_or_taxIsValid;
    }

    model_internal function calculateDiscount_or_taxIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_discount_or_taxValidator.validate(model_internal::_instance.discount_or_tax)
        model_internal::_discount_or_taxIsValid_der = (valRes.results == null);
        model_internal::_discount_or_taxIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::discount_or_taxValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::discount_or_taxValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get discount_or_taxValidationFailureMessages():Array
    {
        if (model_internal::_discount_or_taxValidationFailureMessages == null)
            model_internal::calculateDiscount_or_taxIsValid();

        return _discount_or_taxValidationFailureMessages;
    }

    model_internal function set discount_or_taxValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_discount_or_taxValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_discount_or_taxValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "discount_or_taxValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get trans_qtyStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get trans_qtyValidator() : StyleValidator
    {
        return model_internal::_trans_qtyValidator;
    }

    model_internal function set _trans_qtyIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_trans_qtyIsValid;         
        if (oldValue !== value)
        {
            model_internal::_trans_qtyIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "trans_qtyIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get trans_qtyIsValid():Boolean
    {
        if (!model_internal::_trans_qtyIsValidCacheInitialized)
        {
            model_internal::calculateTrans_qtyIsValid();
        }

        return model_internal::_trans_qtyIsValid;
    }

    model_internal function calculateTrans_qtyIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_trans_qtyValidator.validate(model_internal::_instance.trans_qty)
        model_internal::_trans_qtyIsValid_der = (valRes.results == null);
        model_internal::_trans_qtyIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::trans_qtyValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::trans_qtyValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get trans_qtyValidationFailureMessages():Array
    {
        if (model_internal::_trans_qtyValidationFailureMessages == null)
            model_internal::calculateTrans_qtyIsValid();

        return _trans_qtyValidationFailureMessages;
    }

    model_internal function set trans_qtyValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_trans_qtyValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_trans_qtyValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "trans_qtyValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get note_dateStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get note_dateValidator() : StyleValidator
    {
        return model_internal::_note_dateValidator;
    }

    model_internal function set _note_dateIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_note_dateIsValid;         
        if (oldValue !== value)
        {
            model_internal::_note_dateIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "note_dateIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get note_dateIsValid():Boolean
    {
        if (!model_internal::_note_dateIsValidCacheInitialized)
        {
            model_internal::calculateNote_dateIsValid();
        }

        return model_internal::_note_dateIsValid;
    }

    model_internal function calculateNote_dateIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_note_dateValidator.validate(model_internal::_instance.note_date)
        model_internal::_note_dateIsValid_der = (valRes.results == null);
        model_internal::_note_dateIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::note_dateValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::note_dateValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get note_dateValidationFailureMessages():Array
    {
        if (model_internal::_note_dateValidationFailureMessages == null)
            model_internal::calculateNote_dateIsValid();

        return _note_dateValidationFailureMessages;
    }

    model_internal function set note_dateValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_note_dateValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_note_dateValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "note_dateValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get activestatusStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    [Bindable(event="propertyChange")]   
    public function get quantityStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get quantityValidator() : StyleValidator
    {
        return model_internal::_quantityValidator;
    }

    model_internal function set _quantityIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_quantityIsValid;         
        if (oldValue !== value)
        {
            model_internal::_quantityIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "quantityIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get quantityIsValid():Boolean
    {
        if (!model_internal::_quantityIsValidCacheInitialized)
        {
            model_internal::calculateQuantityIsValid();
        }

        return model_internal::_quantityIsValid;
    }

    model_internal function calculateQuantityIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_quantityValidator.validate(model_internal::_instance.quantity)
        model_internal::_quantityIsValid_der = (valRes.results == null);
        model_internal::_quantityIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::quantityValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::quantityValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get quantityValidationFailureMessages():Array
    {
        if (model_internal::_quantityValidationFailureMessages == null)
            model_internal::calculateQuantityIsValid();

        return _quantityValidationFailureMessages;
    }

    model_internal function set quantityValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_quantityValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_quantityValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "quantityValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get trans_typeStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get trans_typeValidator() : StyleValidator
    {
        return model_internal::_trans_typeValidator;
    }

    model_internal function set _trans_typeIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_trans_typeIsValid;         
        if (oldValue !== value)
        {
            model_internal::_trans_typeIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "trans_typeIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get trans_typeIsValid():Boolean
    {
        if (!model_internal::_trans_typeIsValidCacheInitialized)
        {
            model_internal::calculateTrans_typeIsValid();
        }

        return model_internal::_trans_typeIsValid;
    }

    model_internal function calculateTrans_typeIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_trans_typeValidator.validate(model_internal::_instance.trans_type)
        model_internal::_trans_typeIsValid_der = (valRes.results == null);
        model_internal::_trans_typeIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::trans_typeValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::trans_typeValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get trans_typeValidationFailureMessages():Array
    {
        if (model_internal::_trans_typeValidationFailureMessages == null)
            model_internal::calculateTrans_typeIsValid();

        return _trans_typeValidationFailureMessages;
    }

    model_internal function set trans_typeValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_trans_typeValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_trans_typeValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "trans_typeValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get client_nameStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get client_nameValidator() : StyleValidator
    {
        return model_internal::_client_nameValidator;
    }

    model_internal function set _client_nameIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_client_nameIsValid;         
        if (oldValue !== value)
        {
            model_internal::_client_nameIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "client_nameIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get client_nameIsValid():Boolean
    {
        if (!model_internal::_client_nameIsValidCacheInitialized)
        {
            model_internal::calculateClient_nameIsValid();
        }

        return model_internal::_client_nameIsValid;
    }

    model_internal function calculateClient_nameIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_client_nameValidator.validate(model_internal::_instance.client_name)
        model_internal::_client_nameIsValid_der = (valRes.results == null);
        model_internal::_client_nameIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::client_nameValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::client_nameValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get client_nameValidationFailureMessages():Array
    {
        if (model_internal::_client_nameValidationFailureMessages == null)
            model_internal::calculateClient_nameIsValid();

        return _client_nameValidationFailureMessages;
    }

    model_internal function set client_nameValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_client_nameValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_client_nameValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "client_nameValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }


     /**
     * 
     * @inheritDoc 
     */ 
     override public function getStyle(propertyName:String):com.adobe.fiber.styles.IStyle
     {
         switch(propertyName)
         {
            default:
            {
                return null;
            }
         }
     }
     
     /**
     * 
     * @inheritDoc 
     *  
     */  
     override public function getPropertyValidationFailureMessages(propertyName:String):Array
     {
         switch(propertyName)
         {
            case("note_code"):
            {
                return note_codeValidationFailureMessages;
            }
            case("cre_datetime"):
            {
                return cre_datetimeValidationFailureMessages;
            }
            case("note_description"):
            {
                return note_descriptionValidationFailureMessages;
            }
            case("remarks"):
            {
                return remarksValidationFailureMessages;
            }
            case("pro_serialnumber_fk"):
            {
                return pro_serialnumber_fkValidationFailureMessages;
            }
            case("detserialnumber"):
            {
                return detserialnumberValidationFailureMessages;
            }
            case("unit_price"):
            {
                return unit_priceValidationFailureMessages;
            }
            case("trans_note_header_fk"):
            {
                return trans_note_header_fkValidationFailureMessages;
            }
            case("trans_serialnumber_fk"):
            {
                return trans_serialnumber_fkValidationFailureMessages;
            }
            case("note_type"):
            {
                return note_typeValidationFailureMessages;
            }
            case("price"):
            {
                return priceValidationFailureMessages;
            }
            case("discount_or_tax"):
            {
                return discount_or_taxValidationFailureMessages;
            }
            case("trans_qty"):
            {
                return trans_qtyValidationFailureMessages;
            }
            case("note_date"):
            {
                return note_dateValidationFailureMessages;
            }
            case("quantity"):
            {
                return quantityValidationFailureMessages;
            }
            case("trans_type"):
            {
                return trans_typeValidationFailureMessages;
            }
            case("client_name"):
            {
                return client_nameValidationFailureMessages;
            }
            default:
            {
                return emptyArray;
            }
         }
     }

}

}
